<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>整车调度</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li ><a href="${ctx}/orders/tOrders/busOrderList">订单一览</a></li>
		<%-- <li><a href="${ctx}/realsche/tRealsche/rentlist">待调度</a></li> --%>
		<li  class="active"><a href="${ctx}/realsche/tRealsche/dispatchedlist">已调度</a></li>
	</ul>
	 <form:form id="searchForm" modelAttribute="TRealsche" action="${ctx}/realsche/tRealsche/dispatchedlist" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<table class="table table-condensed" style="width: 100%;">
		<tr class="success"><td>
		<ul class="ul-form">
			<li>
				<span><label>订单名称：</label></span>
				<form:input path="schename" class="input-medium"/>
			</li>
			<li>
				<span><label>&nbsp;&nbsp;订单日期：</label></span>
				<input type="text" id="createDate" name="order.createDateQueryStart" maxlength="20" readonly class="input-small Wdate"
					value="${tRealsche.order.createDateQueryStart }"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
			</li>
			<li>
				<span><label>&nbsp;&nbsp;发车日期：</label></span>
				<input type="text" id="departdate" name="departdateStr" maxlength="20" readonly class="input-small Wdate"
					value="${tRealsche.departdateStr}"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
			</li>
			<li>
				<span><label>&nbsp;&nbsp;选择车型：</label></span>
			<select id="cartype" name="order.cartype.cargotypeid" class="input-medium">
				<option value="">全部</option>
				<c:forEach items="${tCargotypeList}" var="cartype">
					<option value="${cartype.cargotypeid}"
						<c:if test="${cartype.cargotypeid eq tRealsche.order.cartype.cargotypeid}">selected="selected"</c:if>>
							${cartype.typename}</option>
					</c:forEach>
			</select>
			<li class="btns"><input class="btn btn-primary btn-success" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
		</td></tr>
	</table>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>订单号</th>
				<th>订单名称</th>
				<th>订单日期</th>
				<th>发车日期</th>
				<th>车型</th>
				<th>辆数</th>
				<th>订单状态</th>
				<th>司机确认</th>			
				<shiro:hasPermission name="realsche:tRealsche:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="tRealsche">
			<tr>
				<td>${tRealsche.order.orderid}</td>
				<td>${tRealsche.schename}</td>
				<td><fmt:formatDate value="${tRealsche.order.createDate}" pattern="yyyy-MM-dd HH:mm"/></td>
				<td><fmt:formatDate value="${tRealsche.order.departdate}" pattern="yyyy-MM-dd HH:mm"/></td>
				<td>${tRealsche.order.cartype.typename}</td>
				<td>${tRealsche.order.purchasenum}</td>
				<td>${fns:getDictLabel(tRealsche.order.orderstatus, 'orderstatus', '无')}</td>
				<td>${fns:getDictLabel(tRealsche.drvconfirmed, 'drvconfirmed', '无')}</td>
				<shiro:hasPermission name="realsche:tRealsche:edit"><td>
					<a href="${ctx}/realsche/tRealsche/rentdispView?id=${tRealsche.realscheid}">查看</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>